<%--
  Created by IntelliJ IDEA.
  User: Moataz
  Date: Mar 17, 2009
  Time: 11:26:46 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head><title>4H Future Events</title></head>
<body onload="disableLink('futureEvents')">
<%@ include file="header.jspf" %>
<c:if test="${empty futureEvents}">
    There are no active events listed. <a href="createEvent">Create one.</a>
    <br>
    Or <a id="loadTestData" href="loadTestData">Create test data</a>
</c:if>
<c:if test="${not empty futureEvents}">
    <h3>Future Events</h3>

    <p align="right">
        <a href="createEvent">Add a new event.</a>
    </p>
    <table border="1" width="100%">
        <tr>
            <%@ include file="eventsListTableHeader.jspf" %>
            <td BGCOLOR="limegreen"><strong>Details</strong></td>
        </tr>
        <c:forEach var="event" items="${futureEvents}">
            <tr>
                <%@ include file="eventsListTable.jspf" %>
                <td valign="top" align="center">
                    <form action="eventDetails" method="get">
                        <input type="hidden" name="eventID" value="${event.id}"/>
                        <input type="submit" value="View Details"/>
                    </form>
                </td>
            </tr>
        </c:forEach>
    </table>
</c:if>
<%@ include file="footer.jspf" %>
</body>
</html>
